package top.linyuxb.lycloud.samples.server3.impl;

import com.alibaba.fastjson2.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.linyuxb.lycloud.samples.config.service.IClientService2;

/**
 * Created by Intellij IDEA.
 *
 * @Author: linyuxb
 * @Date: 2024/6/5 11:28
 * @Desc:
 */
@Slf4j
@Service
public class ClientService2Impl implements IClientService2 {
    @Override
    public String getSchool(String info, Integer number) {
        log.info("server3 ClientService2Impl getSchool,info:{},number:{}", info, number);
//        ThreadUtil.sleep(1000 * 10);
        return "server3 ClientService2Impl getSchool" + info + "," + number;
    }

    @Override
    public JSONObject saveUser(String info, Integer number, Boolean type) {
        log.info("server3 ClientService2Impl saveUser,info:{},number:{},type:{}", info, number, type);
//        ThreadUtil.sleep(1000 * 10);
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("class", "ClientService2Impl");
        jsonObject.put("method", "saveUser");
        jsonObject.put("info", info);
        jsonObject.put("number", number);
        jsonObject.put("type", type);
        return jsonObject;
    }
}
